package com.tianqi.modules.pms.controller;

import com.tianqi.common.api.CommonResult;
import com.tianqi.modules.pms.dto.request.DateTimeReq;
import com.tianqi.modules.pms.dto.response.LittleLiuRenResp;
import com.tianqi.modules.pms.service.LittleLiuRenService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;
import java.util.List;

/**
 * 小六壬相关接口控制器
 *
 * @author zhangzedi
 * @date 2023/8/22 01:19
 **/
@RestController
@RequestMapping("/pms/littleLiuRen")
public class LittleLiuRenController {

	@Autowired
	private LittleLiuRenService littleLiuRenService;

	@PostMapping("/query")
	@ApiOperation("查询小六壬数据")
	public CommonResult<List<LittleLiuRenResp>> queryLittleLiuRen(@RequestBody @Valid DateTimeReq dateTimeReq) {

		return CommonResult.success(littleLiuRenService.queryLittleLiuRen(dateTimeReq));
	}
}
